export function debounce(func, wait=500){
    var timeId = undefined
    return function (...args){
        clearTimeout(timeId)
        timeId = setTimeout(()=>{
            func.call(this,...args)
        }, wait)
    }
}
